import { env } from "@/utils/env";
import http from "./http";
import { type ResponeData } from "@/types/HttpType";

export const getWeather = async (areaCode: string): Promise<ResponeData<any>> => {
  return await http<any>({
    url: env.VITE_ZHER_SUPPORT + "/amap/weather",
    method: "get",
    params: { areaCode },
  });
};

export const tencentWeather = async (
  areaCode: string
): Promise<ResponeData<any>> => {
  return http({
    url: env.VITE_ZHER_SUPPORT + "/tencent/weather",
    method: "get",
    params: { areaCode },
  });
};
